<template>
    <div>
        <div class="top">
            <div class="name">{{name}}</div>
            <div class="cart_card">{{carNum}}</div>
        </div>
        <div class="btm">
            <ul>
                <li>
                    <div>联系电话</div>
                    <div>{{phone}}</div>
                </li>
                <li>
                    <div>拜访科室</div>
                    <div>{{department}}</div>
                </li>
                <li>
                    <div>拜访人</div>
                    <div>{{visitPeople}}</div>
                </li>
            </ul>
        </div>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                name: '',
                visitPeople: '',
                department: '',
                phone: '',
                carNum: ''
            }
        },
        mounted() {
            if (this.$route.query.name) this.name = this.$route.query.name
            if (this.$route.query.visitPeople) this.visitPeople = this.$route.query.visitPeople
            if (this.$route.query.department) this.department = this.$route.query.department
            if (this.$route.query.phone) this.phone = this.$route.query.phone
            if (this.$route.query.carNum) this.carNum = this.$route.query.carNum
        },
        methods: {
            goHome() {
                this.$router.replace('/home')
            }
        }
    }
</script>

<style scoped lang="less">
    .top {
        width: 100%;
        /*height: 3rem;*/
        padding: .8rem 0;
        background-color: #2A92F9;
        text-align: center;
        color: #fff;

        .name {
            /*padding-top: .8rem;*/
            font-size: .48rem;
            height: .68rem;
            line-height: .68rem;
            font-weight: 700;
        }

        .cart_card {
            margin-top: .2rem;
            font-size: .3rem;
            letter-spacing: .05rem;
        }
    }

    .btm {
        ul {
            li {
                height: .8rem;
                padding: 0 .2rem;
                line-height: .8rem;
                border-bottom: 1px solid #f4f4f4;

                div {

                    &:nth-child(1) {
                        float: left;
                        color: #999;
                    }

                    &:nth-child(2) {
                        float: right;
                    }
                }
            }
        }
    }
</style>
